package com.ruoyi.procurementmanagement.controller;

import java.util.List;
import java.util.Map;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.procurementmanagement.service.ITrackingService;

@RestController
@RequestMapping("/procurementmanagement/tracking")
public class TrackingController extends BaseController {

    @Autowired
    private ITrackingService trackingService;

    @PreAuthorize("@ss.hasPermi('procurementmanagement:tracking:list')")
    @GetMapping("/list")
    public TableDataInfo list(String sn, String supplierName) {
        startPage();
        List<Map<String, Object>> list = trackingService.selectTrackingList(sn, supplierName);
        return getDataTable(list);
    }
}
